﻿using Beetle;
using System;
using System.Threading;

internal class Class_ai : Class_ad
{
    public override void a()
    {
        if (Class_b._field_c && (base._field_f.Socket != null))
        {
            try
            {
                base._field_f._field_r._field_a.SetInfo(base._field_e.Buffer, 0, base._field_e.BytesTransferred);
                base._field_f.a(base._field_f._field_r);
                Interlocked.Decrement(ref base._field_f._field_e);
            }
            catch (Exception exception)
            {
                ChannelErrorEventArgs e = new ChannelErrorEventArgs {
                    Channel = base._field_f,
                    Exception = exception
                };
                base._field_f.CallChannelError(e);
            }
        }
    }

    public override void Dispose()
    {
        base._field_e.d();
        base._field_f = null;
        base._field_e = null;
    }
}

